//GameStateMap.h
#ifndef __GAMESTATEMAP_H__
    #define __GAMESTATEMAP_H__

#include <time.h>
#include "GameState.h"
#include "../Drawing/Area.h"
#include "../Drawing/Camera.h"
#include "../Entity/Entity.h"
#include "../Drawing/Surface.h"
#include "../Entity/Player.h"
#include "../Game.h"


//A class that initializes and controls the Game while it is in the GameStateMap state
class GameStateMap : public GameState {
    public:

//Functions to set what happens when specific keys are pressed and depressed
//SDLKey sym is the SDL defined symbol for a key
        void OnKeyDown(SDLKey sym, SDLMod mod, Uint16 unicode);
        void OnKeyUp(SDLKey sym, SDLMod mod, Uint16 unicode);

//Loads all of the images on the map
        void OnActivate();

//Cleans off all of the images on the map
        void OnDeactivate();

//Manages collisions, along with keeping the player constrained to the map
        void OnLoop();

//Loads and draws the window and map
        void OnRender(SDL_Surface* Surf_Display);

//Returns the instance of the GameState
        static GameStateMap* GetInstance();


    private:
        static GameStateMap Instance;
        bool switchState;
        double random;
        double min;
        double max;

        Player    Player1;
        Player    Player2;
        Entity    Rock;
        Entity    Rock2;
        Entity    Rock3;
        Entity    Rock4;
        Entity    Rock5;
        Entity    Rock6;
        Entity    Rock7;
        Entity    Rock8;
        Entity    Tree[50];

        Entity    Treasure1;

        GameStateMap();


};

#endif
